package com.example.demo.kafka.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Service;

/**
 * Created by ssd on 2018/6/15.
 */
@Service
public class Kafka1Service {
    Logger logger= LoggerFactory.getLogger(Kafka1Service.class);
    @KafkaListener(topics = "myTopics2",groupId = "test1")
    public void consumer(String user){
       logger.info("groupid=test1,接受到消息2:{}",user);
    }
}
